home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / compresn / dvpeg / src1b / jvsetup.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-07  |  4.1 KB  |  88 lines

  1. /*       These are various items which are common to the viewing program
  2.         (jvmain.c) and the video setup program (jvsetup.c).
  3.  
  4.  
  5. */
  6.  
  7. extern    unsigned char cirrus, everex, paradise, tseng, trident;
  8. extern    unsigned char t8900, ativga, aheada, aheadb;
  9. extern    unsigned char oaktech, video7, chipstech, tseng4, genoa;
  10. extern    unsigned char ncr, compaq, vesa, hi_color;        /* signals existance of hi color card */
  11. extern    unsigned char vga512, vga1024;
  12. extern    int maxx, maxy;
  13.  
  14. #define    number_VGA_cards 18            /* the number of VGA cards supported */
  15. #define    number_modes_supported 6    /* the max number of video modes for each card */
  16. #define    number_modes_in_list 10        /* the max number of modes in the user selected list */
  17.  
  18.  
  19. /*        definations for reading keyboard */
  20.  
  21. #define arrow_left 0x4b
  22. #define arrow_right 0x4d
  23. #define arrow_up 0x48
  24. #define arrow_down 0x50
  25. #define page_up 0x49
  26. #define page_down 0x51
  27. #define escape 27
  28. #define home 71
  29. #define end 79
  30. #define RTN 13
  31. #define insert 82
  32. #define delete 83
  33. #define plus 43
  34. #define minus 45
  35.  
  36.  
  37. struct mode {
  38.     int x_size;
  39.     int y_size;
  40.     unsigned char mode_number;};
  41.  
  42.  
  43. /* for this struct.  All items should be in ascending order with 0x00 for the unused mode #'s */
  44. struct video_card {
  45.     char name[20];
  46.     struct mode vid_mode[number_modes_supported];
  47.     } video_cards[number_VGA_cards] =
  48.     { {"ahead", {{320, 200, 0x13}, {640, 400, 0x60}, {640, 480, 0x61}, {800, 600, 0x62}, {0000, 000, 0x00}, {0, 0, 0x0}}},
  49.       {"ati", {{320, 200, 0x13}, {640, 400, 0x61}, {640, 480, 0x62}, {800, 600, 0x63}, {1024, 768, 0x64}, {0, 0, 0x0}}},
  50.       {"chips & tech", {{320, 200, 0x13}, {640, 400, 0x78}, {640, 480, 0x79}, {800, 600, 0x7b}, {0, 0, 0x0}, {0, 0, 0x0}}},
  51.       {"everex", {{320, 200, 0x13}, {640, 400, 0x14}, {512, 480, 0x15}, {640, 480, 0x30}, {800, 600, 0x31}, {0, 0, 0x0}}},
  52.       {"oak-tek", {{320, 200, 0x13}, {640, 480, 0x53}, {800, 600, 0x54}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
  53.       {"genoa", {{320, 200, 0x13}, {640, 400, 0x7e}, {640, 480, 0x5c}, {720, 512, 0x5d}, {800, 600, 0x5e}, {0, 0, 0x0}}},
  54.       {"NCR", {{320, 200, 0x13}, {640, 400, 0x5e}, {640, 480, 0x5f}, {800, 600, 0x5c}, {0, 0, 0x0}, {0, 0, 0x0}}},
  55.       {"paradise", {{320, 200, 0x13}, {640, 400, 0x5e}, {640, 480, 0x5f}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
  56.       {"trident", {{320, 200, 0x13}, {640, 400, 0x5c}, {640, 480, 0x5d}, {800, 600, 0x5e}, {0, 0, 0x00}, {0, 0, 0x0}}},
  57.       {"trident 8900", {{320, 200, 0x13}, {640, 400, 0x5c}, {640, 480, 0x5d}, {800, 600, 0x5e}, {1024, 768, 0x62}, {0, 0, 0x0}}},
  58.       {"tseng", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 480, 0x2e}, {800, 600, 0x30}, {1024, 768, 0x38}, {0, 0, 0x0}}},
  59.       {"tseng 4000", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 400, 0x2f}, {640, 480, 0x2e}, {800, 600, 0x30}, {1024, 768, 0x38}}},
  60.       {"video 7", {{320, 200, 0x13}, {640, 400, 0x66}, {640, 480, 0x67}, {800, 600, 0x69}, {1024, 768, 0x6a}, {0, 0, 0x0}}},
  61.       {"cirrus", {{320, 200, 0x13}, {640, 480, 0x2e}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, { 0, 0, 0x0}}},
  62.       {"compaq", {{320, 200, 0x13}, {640, 480, 0x2e}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, { 0, 0, 0x0}}},
  63.       {"vesa", {{320, 200, 0x13}, {640, 400, 0x100}, {640, 480, 0x101}, {800, 600, 0x103}, {1024, 768, 0x106}, {1280, 1024, 0x107}}},
  64.       {"ATI, hi color", {{1280, 480, 0x72}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}, {0, 0, 0x0}}},
  65.       {"Tseng, hi color", {{320, 200, 0x13}, {640, 350, 0x2d}, {640, 400, 0x2f}, {640, 480, 0x2e}, {800, 600, 0x30}, {0, 0, 0x0}}}
  66.     };
  67.  
  68. /* now the list of working modes as selected by the user - 10 maximum */
  69. /* one extra item at end (always 0) to simplify deletion */
  70. struct {
  71.     int    card_ID;
  72.     int    which_mode;
  73.     } ok_mode[number_modes_in_list+1];
  74.  
  75.  
  76. /* these are for the graphics interface */
  77.  
  78.     unsigned char palbuf[256][3];
  79.     int svga;
  80.     unsigned int color;
  81.     int video_mode_used;        /* mode number index for card */
  82.     int card_used;                /* the current selected mode for viewing */
  83.     int card_id;                /* card id # - as found by autodetection (valid if svga = 1) */
  84.     int enable_pan;            /* enough memory for panning && needed?? */
  85.     int shrink;                    /* 1 = normal, 2 = 1/2, 3 = 1/3 ... */
  86.  
  87.  
  88.